package alloy.ast;

import java.util.Iterator;
import java.util.List;

import alloy.util.CreationInfo;

public abstract class VacuousLeafImpl extends alloy.util.ObjID implements Leaf {

	public LeafId getLeafId() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public void setLeafId(LeafId id_) {
		throw new UnsupportedOperationException(getClass().toString() + id_.toString());
	}

	public Location getLocation() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public void setLocation(Location location_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public List getInvocationLocations() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public void addInvocationLocation(Location invocationLocation_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Iterator getChildren() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Node getParent() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public int numChildren() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public boolean hasChild(Node node_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Node childAt(int index_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public int indexOf(Node child_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public void setChild(int index_, Node node_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public void setParent(Node parent_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public boolean isLeaf() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public String fullString() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public String fullStringShortNames() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Node annotate(String annotation_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Node annotateReplacing(String annotation_, Node other_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Node annotateTransform(String transformAnnotation_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public Node annotateTransformReplacing(String transformAnnotation_, Node other_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public String getAnnotation() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public String getTransformAnnotation() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public void applyVisitor(ASTVisitor visitor_) {
		acceptVisitor(visitor_);
	}

    /**
     * accept an AST visitor
     * @param visitor_ the visitor
     */
    protected abstract void acceptVisitor(ASTVisitor visitor_);// {
//        visitor_.visit(this);
//    }

	
	public Object applyReturnVisitor(ASTReturnVisitor visitor_) {
		return acceptReturnVisitor(visitor_);
	}

    /**
     * accept a returning AST visitor
     * @param visitor_ the visitor
     * @return the Object returned by the visitor
     */
    protected abstract Object acceptReturnVisitor(ASTReturnVisitor visitor_);// {
//        return visitor_.visit(this);
//    }

	
	public boolean isSameAs(Node node_) {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public String pp() {
		throw new UnsupportedOperationException(getClass().toString());
	}

	public CreationInfo getCreationInfo() {
		throw new UnsupportedOperationException(getClass().toString());
	}

    public String toString() {
		throw new UnsupportedOperationException(getClass().toString());
    }

    public Object clone() {
		throw new UnsupportedOperationException(getClass().toString());
    }

    public Object copy() {
		throw new UnsupportedOperationException(getClass().toString());
    }

}
